﻿//-------------------------------------------------------------------
//	Copyright (c) 2010-2014  Zhirnov Andrey
//	This file is part of the "UX Standard Lib" project.
//	See copyright notice in "UX_STL_Ext.h".
//-------------------------------------------------------------------

#ifndef _UXS_CL_SAMPLER_H
#define _UXS_CL_SAMPLER_H

#pragma once

#include "CLDevice.h"

namespace UX_STL
{
namespace CLShell
{

	//
	// CL Sampler
	//

	class UX_EXPORT CLSampler : public CLBaseObject
	{
	protected:
		cl_sampler	_pID;
		
	protected:
		virtual void _RetainRef()	const;
		virtual void _ReleaseRef()	const;
		virtual uint _GetRefCount()	const;
		virtual void _Destroy();

	public:
		CLSampler();
		~CLSampler();

		bool Create(cl_addressing::type eAddressing, cl_filter::type eFilter, bool bNormalized);
		virtual void Destroy();

		cl_addressing::type	GetAddressing() const;
		cl_filter::type		GetFilter()		const;
		bool				IsNormalized()	const;
		cl_sampler			Id()			const	{ return _pID; }
	};

//-------------------------------------------------------------------

}	// CLShell
}	// UX_STL

#endif	// _UXS_CL_SAMPLER_H